const path = require("path");
const fs = require("fs");
const configFilePath = path.join(process.cwd(), './electron/config/config.json');
console.log(configFilePath)
let config = fs.readFileSync(configFilePath, {encoding: 'utf-8'});
config = JSON.parse(config)

let app = {
    user: config.username, //这里写你的数据库的用户名
    password: config.password,//这里写数据库的密码
    server: config.db_address,
    database: config.database, // 数据库名字
    port: config.port, //端口号,默认1433
    options: {
        encrypt: false,  //加密,设置为true时会连接失败 Failed to connect to localhost:1433 - self signed certificate
        enableArithAbort: false
    },
    pool: {
        min: 0,
        max: 10,
        idleTimeoutMillis: 3000
    }
}

module.exports = app